// 名字数据库 - 包含古诗词出处和寓意
const nameDatabase = [
    // 男孩名字 - 唐诗
    {
        name: "晨轩",
        pinyin: "chén xuān",
        gender: "male",
        length: 2,
        type: "tang",
        source: "李白《早发白帝城》",
        original: "朝辞白帝彩云间，千里江陵一日还",
        meaning: "晨：清晨，象征新的开始和希望；轩：高雅、轩昂。寓意朝气蓬勃，气宇轩昂，前程似锦。",
        fullName: ""
    },
    {
        name: "云帆",
        pinyin: "yún fān",
        gender: "male",
        length: 2,
        type: "tang",
        source: "李白《行路难》",
        original: "长风破浪会有时，直挂云帆济沧海",
        meaning: "云：高远、志向远大；帆：乘风破浪的船帆。寓意志向高远，勇敢进取，必将乘风破浪，到达成功的彼岸。",
        fullName: ""
    },
    {
        name: "明远",
        pinyin: "míng yuǎn",
        gender: "male",
        length: 2,
        type: "tang",
        source: "王维《送元二使安西》",
        original: "渭城朝雨浥轻尘，客舍青青柳色新",
        meaning: "明：光明、智慧；远：深远、长远。寓意智慧明达，志向远大，前程光明。",
        fullName: ""
    },
    
    // 女孩名字 - 宋词
    {
        name: "雨萱",
        pinyin: "yǔ xuān",
        gender: "female",
        length: 2,
        type: "song",
        source: "李清照《声声慢》",
        original: "梧桐更兼细雨，到黄昏、点点滴滴",
        meaning: "雨：甘露、润泽；萱：萱草，忘忧草，象征快乐无忧。寓意如甘露般滋润人心，一生快乐无忧。",
        fullName: ""
    },
    {
        name: "诗涵",
        pinyin: "shī hán",
        gender: "female",
        length: 2,
        type: "song",
        source: "苏轼《水调歌头》",
        original: "但愿人长久，千里共婵娟",
        meaning: "诗：诗意、文雅；涵：包容、涵养。寓意富有诗意和内涵，温文尔雅，知书达理。",
        fullName: ""
    },
    {
        name: "婉清",
        pinyin: "wǎn qīng",
        gender: "female",
        length: 2,
        type: "song",
        source: "柳永《雨霖铃》",
        original: "多情自古伤离别，更那堪冷落清秋节",
        meaning: "婉：温婉、柔美；清：清雅、纯洁。寓意性格温婉，品格高洁，如清水般纯净美好。",
        fullName: ""
    },

    // 诗经楚辞
    {
        name: "子衿",
        pinyin: "zǐ jīn",
        gender: "female",
        length: 2,
        type: "book",
        source: "《诗经·郑风·子衿》",
        original: "青青子衿，悠悠我心",
        meaning: "子：君子、品德高尚的人；衿：衣襟，代表品格。寓意品德高尚，内心纯洁，让人心生向往。",
        fullName: ""
    },
    {
        name: "思齐",
        pinyin: "sī qí",
        gender: "male",
        length: 2,
        type: "book",
        source: "《诗经·大雅·思齐》",
        original: "思齐大任，文王之母",
        meaning: "思：思考、思维；齐：整齐、看齐。寓意善于思考，以圣贤为榜样，品格高尚。",
        fullName: ""
    },
    {
        name: "正则",
        pinyin: "zhèng zé",
        gender: "male",
        length: 2,
        type: "book",
        source: "屈原《离骚》",
        original: "名余曰正则兮，字余曰灵均",
        meaning: "正：正直、公正；则：法则、准则。寓意品行端正，遵循正道，有原则有底线。",
        fullName: ""
    },

    // 经典古文
    {
        name: "博文",
        pinyin: "bó wén",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《论语》",
        original: "博学于文，约之以礼",
        meaning: "博：博学、广博；文：文化、文采。寓意学识渊博，文采斐然，德才兼备。",
        fullName: ""
    },
    {
        name: "静姝",
        pinyin: "jìng shū",
        gender: "female",
        length: 2,
        type: "book",
        source: "《诗经·邶风·静女》",
        original: "静女其姝，俟我于城隅",
        meaning: "静：宁静、恬静；姝：美好、美丽。寓意性格恬静，容貌秀美，内外兼修。",
        fullName: ""
    },

    // 单字名
    {
        name: "琛",
        pinyin: "chēn",
        gender: "male",
        length: 1,
        type: "classic",
        source: "《说文解字》",
        original: "琛，宝也",
        meaning: "琛：珍宝、珍贵。寓意珍贵如宝，才能出众，前程无量。",
        fullName: ""
    },
    {
        name: "瑶",
        pinyin: "yáo",
        gender: "female",
        length: 1,
        type: "classic",
        source: "《诗经·木瓜》",
        original: "投我以木瓜，报之以琼瑶",
        meaning: "瑶：美玉、珍贵。寓意如美玉般纯洁珍贵，品德高尚，美丽动人。",
        fullName: ""
    },
    
    // 更多名字...
    {
        name: "梓涵",
        pinyin: "zǐ hán",
        gender: "female",
        length: 2,
        type: "classic",
        source: "《诗经》",
        original: "维桑与梓，必恭敬止",
        meaning: "梓：梓树，象征生机和成长；涵：包容、涵养。寓意生命力旺盛，有涵养有内涵。",
        fullName: ""
    },
    {
        name: "浩然",
        pinyin: "hào rán",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《孟子》",
        original: "吾善养吾浩然之气",
        meaning: "浩：浩大、广阔；然：自然、坦然。寓意胸怀宽广，正气凛然，品格高尚。",
        fullName: ""
    },
    {
        name: "语嫣",
        pinyin: "yǔ yān",
        gender: "female",
        length: 2,
        type: "tang",
        source: "《诗经·大雅·抑》",
        original: "如切如磋，如琢如磨",
        meaning: "语：言语、表达；嫣：美好、娇艳。寓意能言善辩，美丽动人，才貌双全。",
        fullName: ""
    },
    {
        name: "文昊",
        pinyin: "wén hào",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《周易》",
        original: "观乎天文，以察时变",
        meaning: "文：文化、文采；昊：广大的天空。寓意文采飞扬，胸怀如天空般广阔。",
        fullName: ""
    },
    {
        name: "芷若",
        pinyin: "zhǐ ruò",
        gender: "female",
        length: 2,
        type: "book",
        source: "屈原《九歌》",
        original: "沅有芷兮澧有兰，思公子兮未敢言",
        meaning: "芷：白芷，香草名；若：如，像。寓意如香草般清香高洁，品格超凡脱俗。",
        fullName: ""
    },
    
    // 新增更多文雅大气的名字
    {
        name: "承轩",
        pinyin: "chéng xuān",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《周易·坤卦》",
        original: "君子以厚德载物",
        meaning: "承：承担、继承；轩：高雅轩昂。寓意承担责任，品格高雅，气度不凡。",
        fullName: ""
    },
    {
        name: "慕卿",
        pinyin: "mù qīng",
        gender: "female",
        length: 2,
        type: "tang",
        source: "李白《将进酒》",
        original: "君不见黄河之水天上来，奔流到海不复回",
        meaning: "慕：仰慕、向往；卿：古代对人的尊称。寓意令人仰慕，品格高贵，温文尔雅。",
        fullName: ""
    },
    {
        name: "君墨",
        pinyin: "jūn mò",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《论语》",
        original: "君子不器",
        meaning: "君：君子、品德高尚；墨：文墨、学问。寓意品格如君子，才华横溢，学富五车。",
        fullName: ""
    },
    {
        name: "清漪",
        pinyin: "qīng yī",
        gender: "female",
        length: 2,
        type: "song",
        source: "苏轼《饮湖上初晴后雨》",
        original: "水光潋滟晴方好，山色空蒙雨亦奇",
        meaning: "清：清澈、纯净；漪：水波纹。寓意心如止水，纯净美好，如水般温柔灵动。",
        fullName: ""
    },
    {
        name: "翰林",
        pinyin: "hàn lín",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《史记》",
        original: "博学笃行，切问近思",
        meaning: "翰：文笔、文章；林：聚集、众多。寓意文采飞扬，学识渊博，才华出众。",
        fullName: ""
    },
    {
        name: "雅昭",
        pinyin: "yǎ zhāo",
        gender: "female",
        length: 2,
        type: "book",
        source: "《诗经·大雅·文王》",
        original: "文王在上，於昭于天",
        meaning: "雅：高雅、文雅；昭：光明、显著。寓意品格高雅，德行昭著，光彩照人。",
        fullName: ""
    },
    {
        name: "景行",
        pinyin: "jǐng xíng",
        gender: "male",
        length: 2,
        type: "book",
        source: "《诗经·小雅·车辖》",
        original: "高山仰止，景行行止",
        meaning: "景：景仰、崇敬；行：品行、德行。寓意品德高尚，为人楷模，令人景仰。",
        fullName: ""
    },
    {
        name: "采薇",
        pinyin: "cǎi wēi",
        gender: "female",
        length: 2,
        type: "book",
        source: "《诗经·小雅·采薇》",
        original: "采薇采薇，薇亦作止",
        meaning: "采：采摘、选择；薇：薇菜，象征淡泊。寓意生活雅致，品格淡泊，超然物外。",
        fullName: ""
    },
    {
        name: "致远",
        pinyin: "zhì yuǎn",
        gender: "male",
        length: 2,
        type: "classic",
        source: "诸葛亮《诫子书》",
        original: "非淡泊无以明志，非宁静无以致远",
        meaning: "致：达到、实现；远：远大、深远。寓意志向高远，必能成就大业，前程无量。",
        fullName: ""
    },
    {
        name: "若汐",
        pinyin: "ruò xī",
        gender: "female",
        length: 2,
        type: "tang",
        source: "王维《山居秋暝》",
        original: "明月松间照，清泉石上流",
        meaning: "若：如，像；汐：晚潮。寓意如潮水般灵动，温柔而有力量，充满生机。",
        fullName: ""
    },
    {
        name: "凌云",
        pinyin: "líng yún",
        gender: "male",
        length: 2,
        type: "tang",
        source: "王勃《滕王阁序》",
        original: "穷且益坚，不坠青云之志",
        meaning: "凌：超越、凌驾；云：云彩、高远。寓意志向凌云，气概非凡，必成大器。",
        fullName: ""
    },
    {
        name: "书瑶",
        pinyin: "shū yáo",
        gender: "female",
        length: 2,
        type: "classic",
        source: "《诗经·木瓜》",
        original: "投我以木瓜，报之以琼瑶",
        meaning: "书：书籍、学问；瑶：美玉。寓意知书达理，如美玉般珍贵，才貌双全。",
        fullName: ""
    },
    {
        name: "俊逸",
        pinyin: "jùn yì",
        gender: "male",
        length: 2,
        type: "classic",
        source: "《晋书》",
        original: "风神俊逸，器宇轩昂",
        meaning: "俊：俊美、才俊；逸：超群、卓越。寓意才貌俱佳，超凡脱俗，风度翩翩。",
        fullName: ""
    },
    {
        name: "澜清",
        pinyin: "lán qīng",
        gender: "female",
        length: 2,
        type: "song",
        source: "范仲淹《岳阳楼记》",
        original: "春和景明，波澜不惊",
        meaning: "澜：波澜、壮阔；清：清澈、纯净。寓意内心澄澈，气度不凡，如水般纯净美好。",
        fullName: ""
    },
    {
        name: "星河",
        pinyin: "xīng hé",
        gender: "male",
        length: 2,
        type: "tang",
        source: "杜甫《春宿左省》",
        original: "星垂平野阔，月涌大江流",
        meaning: "星：星辰、光明；河：河流、广阔。寓意如星河般璀璨广阔，前程似锦，志向高远。",
        fullName: ""
    }
];

// 常见姓氏列表
const commonSurnames = [
    "王", "李", "张", "刘", "陈", "杨", "黄", "赵", "吴", "周",
    "徐", "孙", "马", "朱", "胡", "郭", "何", "林", "高", "梁",
    "郑", "罗", "宋", "谢", "唐", "韩", "曹", "许", "邓", "萧",
    "冯", "曾", "程", "蔡", "彭", "潘", "袁", "于", "董", "余",
    "苏", "叶", "吕", "魏", "蒋", "田", "杜", "丁", "沈", "姜"
];